<%-- 
    Document   : store_refill
    Created on : Jun 7, 2012, 9:28:38 PM
    Author     : praneeth
--%>

<%@page import="java.sql.*" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>newconnection jsp </title>
    </head>
    <body>    <h4>New Connection</h4>
         
        
        <%
        
        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
           String cname1=request.getParameter("cname");
           String did1=request.getParameter("did");
           String add1=request.getParameter("add");
           String q1="insert into New_Connection values('"+cname1+"','"+did1+"','"+add1+"')";
           System.out.println(q1);
         Connection connection=DriverManager.getConnection("jdbc:odbc:egasdsn");
        Statement stmt =connection.createStatement();
         int rs=stmt.executeUpdate(q1);
         //out.println(q1+"  "+rs);
            if(rs==1)
                out.println("Accepted wait for respond");
        
        %>
    </body>
</html>
